<?php
/**
 * index.phtml
 * 
 * categories index
 * 
 * @category    Madoqua
 * @package     Module
 * @subpackage  BlogAdmin
 */

$this->adminNavigation('post', 'category');

?>
<h2>Categories</h2>
<p>
    With categories you can bring order to the chaos that your posts are.
</p>

<h2>Your Categories</h2>
<?php if(count($this->categories)) : ?>
<ul class="categories">
    <?php foreach($this->categories as $category) : ?>
    <li>
        <a href="<?php echo $this->url(array('action' => 'update', 'id' => $category->id), 'blog_admin'); ?>">
            <?php echo $category->name; ?>
        </a>
    </li>
    <?php endforeach; ?>
</ul>
<?php else : ?>
<p>
    There are no categories in the database
</p>
<?php endif; ?>

<h2>Create a new category</h2>
<?php echo $this->form; ?>